<template>
    <div>

         <h2>显示</h2>
        
        单号
        <input type="text" v-model="cha.CaiDh">
        状态
        <select v-model="cha.Zid">
            <option value="0">请选择</option>
            <option :value="a.zid" v-for="a in xia">{{a.zname}}</option>
        </select>
        <input type="button" value="查询" @click="getdate">
        <table class="table">
            <thead>
                <tr>
                <td>单号</td>
                <td>金额</td>
                <td>日期</td>
                <td>状态</td>
                <td>照片</td>
            </tr>
            </thead>
            <tbody >
             <tr v-for="a in data">
                <td>{{a.caiDh}}</td>
                 <td>{{a.caijine}}</td>
                 <td>{{a.caidate}}</td>
                 <td>{{a.zname}}</td>
                 <td><img :src="'https://localhost:7202'+a.dianhua"></td>

            </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import axios from 'axios';
import { ref } from 'process';
 
import { onMounted } from 'vue';

onMounted(() => {
    xiala();
    getdate();
});

var cha:any=ref(
     {
    prgaext:1,
    pargeztim:2,
    Zid:0,
    CaiDh:''
    }
)
var xia:any=ref([{
    "zid": 0,
    "zname": ""
  }
]
)
var xiala=()=>{
axios.get('https://localhost:7202/api/Rw/xila').then((res)=>{
    xia.value=res.data;
})
}

var data:any=ref(
    [
    {
      "hid": 0,
      "caiDh": "string",
      "caijine": "string",
      "caidate": "2025-08-28",
      "zid": 0,
      "dianhua": "string",
      "zname": "string"
    }
  ]
)
var zong:any=ref(
    {
         count:0,
         listcount:0
    }
)
var getdate=()=>{
    axios.get('https://localhost:7202/api/Rw/SHowH',{params:cha.value}).then((res)=>{
        data.value=res.data.count;
    })
}

</script>

<style scoped>

</style>